﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace ece750project
{
    public partial class ADD_prescription : Form
    {
        public ADD_prescription()
        {
            InitializeComponent();
        }

        private void button1_Click(object sender, EventArgs e)
        {
            abc_app.AddPrescription_para.Cancled = false;
            abc_app.AddPrescription_para.Details = txtDetails.Text;
            abc_app.AddPrescription_para.title = txttitle.Text;
            abc_app.AddPrescription_para.SDate = Convert.ToDateTime(txtDate.Text);
            this.Close();
        }

        private void ADD_prescription_Load(object sender, EventArgs e)
        {
            abc_app.AddPrescription_para.Cancled = true;
            if (abc_app.AddPrescription_para.Show_mode == true)
            {
                try
                {
                    txtDetails.Text = abc_app.AddPrescription_para.Details;
                    txttitle.Text = abc_app.AddPrescription_para.title;
                    txtDate.Text = abc_app.AddPrescription_para.SDate.ToShortDateString();
                    abc_app.AddPrescription_para.Show_mode = false;
                }
                catch (Exception ex)
                {
                   
                }
            }
        }
    }
}
